﻿@{
    var requierd = string.Empty;
    if(Model.ExtendRuleValues!=null && Model.ExtendRuleValues.Count > 0)
    {
        var listrulevalues= Model.ExtendRuleValues as List<InputStyleRule>;
        var requiredModel= listrulevalues.Where(a => a.Type== ValidateType.Required.ToString()).FirstOrDefault();
        if (requiredModel!=null)
        {
            requierd = requiredModel.Message;
        }
    }
     List<InputStyleItemVuale> itemvuale=null;
    if(Model.ExtendItemValues!=null && Model.ExtendItemValues.Count > 0)
    {
        itemvuale = Model.ExtendItemValues as List<InputStyleItemVuale>;
    }
    <div class="layui-form-item">
                <label class="layui-form-label @(!string.IsNullOrEmpty(requierd)?"layui-form-required":"")">@Model.DisplayName</label>
                <div class="layui-input-block">
                <select name="@Model.AttributeName"   @(!string.IsNullOrEmpty(requierd)?"lay-verify=required":"")>
                  @foreach(var v in itemvuale){
                      <option value="@v.Value" @(v.Selected=="1"?"checked":"") >@v.Label</option> 
                    }
                </select> 
                </div>
  </div>
}
